package util

import org.zeroturnaround.zip.ZipUtil
import java.io.File

//fun main(args: Array<String>) {
//    FileZipUtils.zip(File("/home/cuile/Downloads/flashplayer-standalone"), "/home/cuile/Desktop/1.zip")
//    FileZipUtils.unZip(File("/home/cuile/Desktop/1.zip"), "/home/cuile/Desktop/flashplayer-standalone")
//}
object FileZipUtils {

    fun zip(file: File, desPath: String) {
        ZipUtil.pack(file, File(desPath))
        println("zip done")
    }

    fun unZip(zipFile: File, desPath: String) {
        println("Starting unzip srcfile is ${zipFile.path}, desPath is $desPath")
        ZipUtil.unpack(zipFile, File(desPath))
        println("unzip done")
    }

}